<template>
  <div class="tabControl">
    <div class="meTabControl" v-for="item in other">
      <span class="meTabControlImg"><img :src="item.url" alt=""></span>
      <div class="tabControlName">{{item.name}}</div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "OtherTabControl",
    props: {
      other: {
        type: Array,
        default(){
          return [];
        }
      }
    },
    created() {
      /**
       * 解决动态加载本地图片问题
       */
      this.other.forEach((res) => {
        res.url = require('assets/images/profile/' + res.url + '.png');
      });
    }
  }
</script>

<style scoped>
  .tabControl{
    background-color: #fff;
    font-size: 15px;
    color: #333;
    margin-top: 10px;
  }
  .meTabControl{
    height: 44px;
    line-height: 44px;
    position: relative;
  }
  .meTabControl .meTabControlImg{
    margin-top: 10px;
    position: absolute;
    left: 16px;
    top: -3px;
  }
  .meTabControl .meTabControlImg img{
    width: 22px;
    height: 22px;
  }
  .meTabControl .tabControlName{
    margin-left: 40px;
    border-bottom: 1px solid rgba(100, 100, 100, .1);
    padding-left: 5px;
  }
  .meTabControl:last-child .tabControlName{
    border-bottom: none;
  }
</style>